package Package.MethodReference.ReferenceInstanceMethods;

import java.util.Locale;

public class ReferenceInstanceMethods {
    private static String str;
    public static final void ReferenceInstanceMethods(){
        str="Hello World!!";
        usePrinter(s-> System.out.println(s.toUpperCase()));
        PrintString ps=new PrintString();
        usePrinter(ps::printUpper);
    }
    private static  void usePrinter(Printer p){
        p.printUpperCase(str);
    }
}
